﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pgAnexos.aspx.cs" Inherits="EGuayas.Web.Licenciamiento.dma.tabs.pgAnexos" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link  href="~/Resources/css/Style.css"  rel="stylesheet" />
    <!-- Load Ext JS --> 
    <script src="../../../Resources/js/Global.js"></script>
   
</head>
<body>  
    <form id="Form1" runat="server"> 
        <ext:ResourceManager ID="pgIdCategManager" runat="server" />
        <ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
            <Items>
                <ext:FormPanel ID="FormPanel1" runat="server" Region="Center" Layout="VBoxLayout" >
                        <LayoutConfig>
                                <ext:VBoxLayoutConfig Align="Stretch" />
                        </LayoutConfig>
                        <Items>
                             <ext:FormPanel
                                ID="frmSettings"
                                runat="server" 
                                Title="Documentos" 
                                Icon="PageWhiteStack" 
                                Margins="5 5 5 5" 
                                Flex="1"
                                Layout="FitLayout"
                                BodyBorder="0"                          
                                Collapsible="true">                           
                                <Items>
                                            <ext:GridPanel
                                                ID="gpDocumentosLoad"
                                                runat="server"                                           
                                                Height="90">
                                                <Store>
                                                    <ext:Store ID="Store2" runat="server">
                                                        <Model>
                                                            <ext:Model ID="Model2" runat="server" IDProperty="Id">
                                                                <Fields>
                                                                    <ext:ModelField Name="FaseLicId" Type="String" />
                                                                    <ext:ModelField Name="FechaCreacion" Type="Date" />
                                                                    <ext:ModelField Name="FechaFirmado" Type="Date" />
                                                                    <ext:ModelField Name="Firmado" Type="String" />
                                                                    <ext:ModelField Name="Id" Type="String" />
                                                                    <ext:ModelField Name="Descripcion" Type="String" />
                                                                    <ext:ModelField Name="Nombre" Type="String" />
                                                                    <ext:ModelField Name="PersonaId" Type="String" />
                                                                    <ext:ModelField Name="PersonaNombres" Type="String" />
                                                                    <ext:ModelField Name="Referencia" Type="String" />
                                                                    <ext:ModelField Name="RequiereFirmar" Type="String" />
                                                                    <ext:ModelField Name="Ruta" Type="String" />
                                                                    <ext:ModelField Name="TipoDocumento" Type="String" />
                                                                    <ext:ModelField Name="SubirNuevo" Type="String" />
                                                                    <ext:ModelField Name="Version" Type="Int" />
                                                                </Fields>
                                                            </ext:Model>
                                                        </Model>                                      
                                                        <Proxy>
                                                            <ext:PageProxy DirectFn="App.direct.BindData">
                                                                <Reader>
                                                                    <ext:JsonReader></ext:JsonReader>
                                                                </Reader>
                                                            </ext:PageProxy>
                                                        </Proxy>
                                                    </ext:Store>
                                                </Store>
                                                <ColumnModel ID="ColumnModel2" runat="server">
                                                    <Columns>
                                                        <ext:Column  runat="server" Text="Id" DataIndex="Id" Flex="1" Hidden="true"/>
                                                        <ext:Column  runat="server" Text="Nombre" DataIndex="Nombre" Flex="1"/>
                                                        <ext:Column  runat="server" Text="Decripción" DataIndex="Descripcion" /> 
                                                        <ext:DateColumn runat="server" Text="Fecha" Width="95" DataIndex="FechaCreacion" Format="dd-m-yy" />
                                                        <ext:CommandColumn ID="CommandColumn0" runat="server" Width="120" Text="">
                                                                    <Commands>
                                                                        <ext:GridCommand Icon="Zoom" CommandName="View" Text="Vizualizar">
                                                                            <ToolTip Text="Vizualizar" />
                                                                        </ext:GridCommand>
                                                                    </Commands>
                                                                    <PrepareToolbar />
                                                                    <Listeners>
                                                                          <Command Handler="AppGlobalJs.showPdf('../../..',record.data.Ruta);" >                                                                             
                                                                           </Command>
                                                                    </Listeners>                                                       
                                                       </ext:CommandColumn>
                                                                                                               
                                                    </Columns>                                                    
                                                </ColumnModel>
                                                <Plugins>
                                                    <ext:RowExpander ID="RowExpander1" runat="server">
                                                        <Loader ID="Loader1" runat="server" DirectMethod="#{DirectMethods}.GetSubDoc" Mode="Component">
                                                            <LoadMask ShowMask="true" />
                                                            <Params>
                                                                <ext:Parameter Name="id" Value="this.record.data.Referencia" Mode="Raw" />
                                                            </Params>
                                                        </Loader>
                                                    </ext:RowExpander>
                                                </Plugins>                                                              
                                            </ext:GridPanel>
                                   </Items>
                            </ext:FormPanel>                           
                       </Items>
                       
           </ext:FormPanel>
               
            </Items>
       </ext:Viewport>
    </form>
    <ext:XScript ID="XScript1" runat="server">
        <script language="javascript" type="text/javascript">
            var pgFn    = new Object();
           
           
            
       </script>
    </ext:XScript>     
</body>


</html>
